package test;

public interface Interface {
    static void staticMethod() {
        System.out.println("static method called");
    }
    default void defaultMethod() {
        System.out.println("default method called");
    }

    void method();
    public static void main(String[] args) {
        staticMethod();
        Interface obj = new Interface() {
            @Override
            public void defaultMethod() {
                System.out.println("default method overridden");
            }

            @Override
            public void method() {
                System.out.println("method called");
            }
        };
        obj.defaultMethod();
    }
}
